export TST_TS_TOPDIR  ?= $(shell pwd)/..
include $(TST_TS_TOPDIR)/Makefile.common
ALL_SRC       := $(filter-out %.mod.c, $(wildcard *.c))
ALL_OBJ       := $(patsubst %.c,%.o,$(ALL_SRC))
ALL_BIN       := $(patsubst %.o,%.test,$(ALL_OBJ))
CFLAGS        +=
LDFLAGS       +=
LDFLAGS       +=

all: $(ALL_BIN)

$(ALL_BIN):%.test:%.o
	$(CC) $^ -o $@ $(LDFLAGS)

$(ALL_OBJ):%.o:%.c
	$(CC) $(CFLAGS) -c $^ -o $@

clean:
	rm -rfv $(ALL_OBJ) $(ALL_BIN)

cleanall: clean
